//
//  Data.m
//  AliBall
//
//  Created by 殷殷明静 on 16/8/12.
//  Copyright © 2016年 殷明静. All rights reserved.
//

#import "Data.h"

@implementation Data
- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    if ([key isEqualToString:@"action"]) {
        Action *ac = [Action modelWithDic:value];
        _action_objc = ac;
    } else if ([key isEqualToString:@"data"]) {
        NSMutableArray <Data1 *>*arr = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            Data1 *data1 = [Data1 modelWithDic:dic];
            [arr addObject:data1];
        }
        _data_array = arr;
    }
}
@end
